// 在 main.js 中
import { createApp } from 'vue';
import App from './App.vue';
import { ComponentRegistrar } from './utils/componentRegistrar';
import './index.css';
import router from './router';

import 'font-awesome/css/font-awesome.min.css'

import RowComponent from "./components/basic/RowComponent.vue"
import ColumnComponent from './components/basic/ColumnComponent.vue';
import ArticleContent from './components/article/ArticleContent.vue';
import ArticleInteractions from './components/article/ArticleInteractions.vue';
import RelatedArticles from './components/article/RelatedArticles.vue';
import ArticleTags from './components/article/ArticleTags.vue';
import AuthorColumn from './components/article/AuthorColumn.vue';

const app = createApp(App);

// 使用路由
app.use(router);

// 正确地传递 Vue 应用实例
ComponentRegistrar.registerAllBusinessComponentsSync(app);
ComponentRegistrar.registerComponents(app, [ColumnComponent, RowComponent, ArticleContent, ArticleInteractions, RelatedArticles, ArticleTags, AuthorColumn]);

app.mount('#app');
